package shapes.shapes2D 
{
	import flash.display.Graphics;
	import flash.display.Sprite;
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Circle extends BaseShape
	{
		private var _radius:Number;
		public function Circle( x:Number = 0, y:Number = 0, radius:Number = 1 ) 
		{
			this.x = x;
			this.y = y;
			_radius = radius;
		}
		
		public function draw( graphics:Graphics = null ):void
		{
			if ( graphics == null ) 
			{
				
				graphics = this.graphics;
				graphics.clear();
				graphics.lineStyle( strokeWidth, strokeColor, strokeAlpha );
				graphics.beginFill( fillColor, fillAlpha );
				graphics.drawCircle( 0, 0, radius );
				
			}
			else
			{	
				graphics.drawCircle( x, y, radius );
			}
		}
		
		public function get radius():Number { return _radius; }
		
		public function set radius(value:Number):void 
		{
			_radius = value;
		}
		
	}

}